package com.ygqh.baby.po;

import com.ygqh.baby.ao.*;
import com.ygqh.baby.utils.DateConvertUtils;

import java.math.BigDecimal;
import java.util.Date;

public class YgCardCouponDetail implements Cloneable {
	private Long id;

	private Long userId;

	private Long cardId;

	private CardType cardType;

	private CardMode cardMode;

	private String productName;

	private String color;

	private String imagePath;

	private BigDecimal price;

	private Long relationId;

	private Date createTime;

	private CardSource source;

	private UseStatus useStatus;

	private Date useTime;

	private String remark;

	private DataStatus status;

	private Date startDate;

	private Date endDate;

	// =====================
	private String title;

	private Boolean isGived;

	private String userName;

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Boolean getIsGived() {
		return isGived;
	}

	public void setIsGived(Boolean isGived) {
		this.isGived = isGived;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public CardType getCardType() {
		return cardType;
	}

	public void setCardType(CardType cardType) {
		this.cardType = cardType;
	}

	public String getMonth() {
		if (startDate == null) {
			return "";
		}
		return DateConvertUtils.format(startDate, "yyyy-MM");
	}

	public CardSource getSource() {
		return source;
	}

	public void setSource(CardSource source) {
		this.source = source;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public Long getCardId() {
		return cardId;
	}

	public void setCardId(Long cardId) {
		this.cardId = cardId;
	}

	public Long getRelationId() {
		return relationId;
	}

	public void setRelationId(Long relationId) {
		this.relationId = relationId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public UseStatus getUseStatus() {
		return useStatus;
	}

	public void setUseStatus(UseStatus useStatus) {
		this.useStatus = useStatus;
	}

	public Date getUseTime() {
		return useTime;
	}

	public void setUseTime(Date useTime) {
		this.useTime = useTime;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark == null ? null : remark.trim();
	}

	public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}

	public CardMode getCardMode() {
		return cardMode;
	}

	public void setCardMode(CardMode cardMode) {
		this.cardMode = cardMode;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	@Override
	public YgCardCouponDetail clone() {
		try {
			return (YgCardCouponDetail) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return null;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Boolean getGived() {
		return isGived;
	}

	public void setGived(Boolean gived) {
		isGived = gived;
	}

	@Override
	public String toString() {
		return "YgCardCouponDetail{" +
				"id=" + id +
				", userId=" + userId +
				", cardId=" + cardId +
				", cardType=" + cardType +
				", cardMode=" + cardMode +
				", productName='" + productName + '\'' +
				", color='" + color + '\'' +
				", imagePath='" + imagePath + '\'' +
				", price=" + price +
				", relationId=" + relationId +
				", createTime=" + createTime +
				", source=" + source +
				", useStatus=" + useStatus +
				", useTime=" + useTime +
				", remark='" + remark + '\'' +
				", status=" + status +
				", startDate=" + startDate +
				", endDate=" + endDate +
				", title='" + title + '\'' +
				", isGived=" + isGived +
				", userName='" + userName + '\'' +
				'}';
	}
}